package com.jia.service;

import com.jia.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(value = "springcloud-provider-dept",fallbackFactory = DeptClientServiceFallbackFactory.class )
@Component
public interface DeptClientService {

    @PostMapping("/dept/add")
    public int deleteDept(Long deptno);
    @GetMapping("/dept/list")
    public List<Dept> selectAll();
    @GetMapping("/dept/info/{id}")
    public Dept selectById(@PathVariable("id") Long deptno);
}
